package gui;

import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;


public class KLMRadioStation {
        final static boolean USE_SYSTEM_LOOK_AND_FEEL = true;
        
        private static void createAndShowGUI() {
        //Create and set up the window.
        MainForm frame = new MainForm();

        //Display the window.
        frame.pack();
        frame.setVisible(true);        
    }
        
    public static void main(String[] args) {
        try {
            if (USE_SYSTEM_LOOK_AND_FEEL) {
                //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

                for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                    if ("Nimbus".equals(info.getName())) {
                        javax.swing.UIManager.setLookAndFeel(info.getClassName());
                        break;
                    }
                }
            }
            else {
                UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
            }
        } catch (UnsupportedLookAndFeelException ex) {
            ex.printStackTrace();
        } catch (IllegalAccessException ex) {
            ex.printStackTrace();
        } catch (InstantiationException ex) {
            ex.printStackTrace();
        } catch (ClassNotFoundException ex) {
            ex.printStackTrace();
        }

        //Schedule a job for the event dispatch thread:
        //creating and showing this application's GUI.
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
            }
        });
    }
}
